package com.hingstd.lastwork.services;

import com.hingstd.lastwork.dao.CommentRepository;
import com.hingstd.lastwork.entities.Comment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentService {

    @Autowired
    CommentRepository commentRepository;

    public Comment save(Comment comment) {

        return commentRepository.save(comment);
    }
    public List<Comment> getAll(){
        return commentRepository.findAll();
    }
}
